@charset "utf-8";

/* reset */
html, body, div, p, h1, h2, h3, h4, h5, h6, ul, li, ol, dl, dt, dd, span, img, a, form, input, select, label, textarea, button, legend, iframe, blockquote, pre, hr, figure, table, td, th, tr, caption, header, footer, section, article, aside, nav {
    margin: 0;
    padding: 0;
}
ul, ol {
    list-style: none;
}
a, button {
    cursor: pointer;
}
a {
    text-decoration: none;
}
fieldset, img {
    border: 0;
}
h1, h2, h3, h4, h5, h6 {
    font-size: 100%;
}
button, select, textarea {
    font-size: 100%;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: Helvetica, Arial, "Microsoft YaHei", sans-serif;
    background-color: #fff;
}

.container {
    margin: 0 auto;
    width: 92%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* 修改为flex-start以左对齐 */
}


.sidebar {
    width: 100%;
    padding: 1rem;
    border-bottom: 0.1rem solid #ccc;
    background-color: #fff;
}

.threshold-range{
	display: flex;
	flex-direction: row;
	align-items: center;
}

.sidebar h1 {
    margin-top: 2rem;
    margin-bottom: 3rem;
    font-size: 3.2rem;
    color: #666;
    text-align: left; /* 修改为左对齐 */
}

.sidebar .threshold,
.sidebar .mode,
.sidebar .scale {
    margin-top: 2rem;
    text-align: left; /* 修改为左对齐 */
}

.scale{
	display: flex;
	flex-direction: row;
	align-items: center;
}

.sidebar .threshold .threshold-val {
    font-size: 1.8rem;
    color: #36b953;
}

.sidebar .disable .btn-small {
    color: #ccc;
    cursor: default;
}

.sidebar .disable input[type="range"]::-webkit-slider-thumb {
    background-color: #ccc;
}

.threshold-checkbox{
	display: flex;
	flex-direction: row;
	align-items: center;
}

.sidebar .disable .threshold-val {
    color: #ccc;
}

.sidebar .disable .option + label::before {
    -webkit-box-shadow: 0 0 0 0.2rem #ccc;
            box-shadow: 0 0 0 0.2rem #ccc;
    background-color: #fff;
    cursor: default;
}

.sidebar .disable .option:checked + label::before {
    -webkit-box-shadow: 0 0 0 0.2rem #ccc;
            box-shadow: 0 0 0 0.2rem #ccc;
    background-color: #ccc;
    cursor: default;
}

.sidebar .disable label {
    color: #666;
    cursor: default;
}

#scale {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    padding-left: 1rem;
    width: 70%;
	padding: 0.5rem;
    border: 0.1rem solid #ccc;
    -webkit-border-radius: 0.2rem;
            border-radius: 0.2rem;
    outline: none;
    color: #333;
}

.main {
    width: 100%;
    padding-top: 4rem;
    text-align: left; /* 修改为左对齐 */
}

#canvas {
    display: block;
    margin: 0 auto;
    max-width: 50rem;
}

#img-upload {
    display: none;
}

#img-preview {
    margin-top: 2rem;
    width: 100%;
    min-height: 20rem;
    border: 0.1rem solid #ccc;
    -webkit-border-radius: 0.6rem;
            border-radius: 0.6rem;
    line-height: 20rem;
    text-align: center;
    color: #999;
}

#img-preview img {
    display: inline-block;
    max-width: 100%;
    max-height: 25rem;
    vertical-align: middle;
}

.option {
    position: absolute;
    left: 0;
    visibility: hidden;
	bottom: 0.5rem;
}

.option + label {
    display: inline-block;
    position: relative;
    left: 2.6rem;
    cursor: pointer;
}
.option + label::before {
    content: '';
    position: absolute;
    left: -2.4rem;
    top: 0.2rem;
    width: 0.8rem;
    height: 0.8rem;
    border: 0.4rem solid #fff;
    -webkit-box-shadow: 0 0 0 0.2rem #36b953;
            box-shadow: 0 0 0 0.2rem #36b953;
    -webkit-border-radius: 50%;
            border-radius: 50%;
    background-color: #fff;
}

.option:checked + label::before {
    content: '';
    position: absolute;
    left: -2.4rem;
    top: 0.2rem;
    width: 0.8rem;
    height: 0.8rem;
    border: 0.4rem solid #fff;
    -webkit-box-shadow: 0 0 0 0.2rem #36b953;
            box-shadow: 0 0 0 0.2rem #36b953;
    -webkit-border-radius: 50%;
            border-radius: 50%;
    background-color: #36b953;
}

input[type="range"] {
    width: 100%;
    height: 0.5rem;
    -webkit-border-radius: 0.6rem;
            border-radius: 0.6rem;
    outline: none;
    background-color: #b9c4bf;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 2rem;
    width: 1.2rem;
    background-color: rgba(42, 210, 110, .9);
    border: none;
    -webkit-border-radius: 0.2rem;
            border-radius: 0.2rem;
    -webkit-box-shadow: 0 0 0.1rem rgba(42, 210, 110, .2);
            box-shadow: 0 0 0.1rem rgba(42, 210, 110, .2);
}

label {
    color: #333;
}

.btn {
    display: block;
    padding: 0.6rem;
    width: 8rem;
    height: 2rem;
    -webkit-border-radius: 0.4rem;
            border-radius: 0.4rem;
    font-size: 1.4rem;
    text-align: center;
    text-shadow: 0 0 0.1rem rgba(0, 0, 0, .2);
    color: #fff;
    background-color: #36b953;
    cursor: pointer;
    -webkit-transition: opacity .5s;
            transition: opacity .5s;
    margin: 1rem auto; /* 居中按钮 */
}

.btn:hover {
    opacity: .8;
}

.btn-small {
    display: inline-block;
    vertical-align: middle;
    padding: 0 0.6rem;
    border: none;
    outline: none;
    font-size: 2rem;
    text-align: center;
    text-shadow: 0 0 0.1rem rgba(0, 0, 0, .2);
    color: #36b953;
    background-color: #fff;
    cursor: pointer;
}
